﻿/**********************************************************************
 * @file   GUIGeometrySweepDialog.h
 * @brief  扫掠界面
 * @author yangjing (1195810980@qq.com)
 * @date   2025-03-05
 *********************************************************************/
#ifndef __GUI_GEOMTRY_SWEEP_DIALOG_H__
#define __GUI_GEOMTRY_SWEEP_DIALOG_H__
#include <array>

#include "GUIGeometryBaseDialog.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
namespace Ui { class GUIGeometrySweepDialog; }
namespace Interface
{
    class FITKAbsGeoModelSegment;
    class VirtualShape;
}
namespace GUI {
    /**
    * @brief 创建扫掠窗口
    * @author yangjing (1195810980@qq.com)
    * @date 2025-03-06
    */
    class GUIGeometryDialogAPI GUIGeometrySweepDialog : public GUIGeometryBaseDialog
    {
        Q_OBJECT

    public:
        /**
        * @brief 创建的构造函数
        * @param[i]  oper           operators
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        GUIGeometrySweepDialog(Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief 编辑的构造函数
         * @param[i]  obj            My Param doc
         * @param[i]  oper           My Param doc
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-06
         */
        GUIGeometrySweepDialog(Interface::FITKAbsGeoModelSegment* obj, Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief 析构函数
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-06
         */
        ~GUIGeometrySweepDialog();
        /**
         * @brief init
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-06
         */
        void init() override;

    private:
        /**
        * @brief    获取设置的名称
        * @return   QString
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-06
        */
        QString getNameText() override;

        /**
        * @brief    拾取完成操作器,点击后，触发
        * @return   void
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-06
        */
        virtual void pickFinishedOper() override;
    private slots:

        /**
        * @brief 扫掠类型响应
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        void on_stretch_type_activated(int item);

        /**
        * @brief确认按钮响应
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        void on_pushButton_OK_clicked();

        /**
        * @brief    取消按钮响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        void on_pushButton_Cancel_clicked();


        /**
        * @brief    选择按钮1 响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        void on_button_pick_1_clicked();

        /**
        * @brief    选择按钮2 响应
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        void on_button_pick_2_clicked();


        /**
        * @brief  参考面选取
        * @return   void
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-04
        */
        void OnPick1();

        /**
        * @brief 线选择选取
        * @return   void
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-04
        */
        void OnPick2();


        /**
         * @brief    拾取过程中 Pick1的处理槽
         * @return   void
         * @author   yangjing (1195810980@qq.com)
         * @date     2025-03-04
         */
        void Onpick1InProcess();

        /**
         * @brief    拾取过程中 Pick2的处理槽
         * @return   void
         * @author   yangjing (1195810980@qq.com)
         * @date     2025-03-04
         */
        void Onpick2InProcess();
    private:

        /**
        * @brief 获取当前获取到多少个对象
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        int getPickNum();

        /**
        * @brief检查数据
        * @author yangjing (1195810980@qq.com)
        * @date 2025-03-06
        */
        QString checkArgc();

        /**
        * @brief 获取当前拾取到的虚拓扑
        * @return   void
         * @author yangjing (1195810980@qq.com)
         * @date 2025-03-04
        */
        Interface::VirtualShape getVirtualShape();
    private:

        Interface::VirtualShape m_Profile;
        Interface::VirtualShape m_Curve;

        Ui::GUIGeometrySweepDialog *_ui = nullptr;
    };
}
#endif // GUIGeometryLineFromStretchDialog_H

